package com.platform.service.impl;

import com.platform.domain.model.FunctionResourcesKey;
import com.platform.service.FunctionResourcesService;
import com.platform.dao.FunctionResourcesDao;
import com.platform.domain.model.FunctionResources;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


/**
* FunctionResources
*
* User: wangyang
* DateTime: 2012-10-08 16:11:58
*
*/
@Service("functionResourcesService")
public class FunctionResourcesServiceImpl implements FunctionResourcesService {

    @Resource
    private FunctionResourcesDao functionResourcesDao;

    /**
    *
    * 根据主键查询FunctionResources对象
    *
    * @param key
    * @return FunctionResources对象
    */
    @Override
    public FunctionResources selectByPrimaryKey(FunctionResourcesKey key) throws Exception {
        return functionResourcesDao.selectByPrimaryKey(key);
    }

    /**
    *
    * 根据查询条件查询符合条件的FunctionResources对象
    *
    * @param functionResources
    * @return 符合条件的FunctionResources对象List
    */
    @Override
    public List<FunctionResources> select(FunctionResources functionResources) throws Exception {
        return functionResourcesDao.select(functionResources);
    }

    /**
    *
    * 根据主键删除FunctionResources对象
    *
    * @param key
    * @return 影响条件数
    */
    @Override
    public int deleteByPrimaryKey(FunctionResourcesKey key) throws Exception {
        return functionResourcesDao.deleteByPrimaryKey(key);
    }

    /**
    *
    * 根据条件删除符合条件的FunctionResources对象
    *
    * @param functionResources
    * @return 影响条件数
    */
    @Override
    public int delete(FunctionResources functionResources) throws Exception {
        return functionResourcesDao.delete(functionResources);
    }

    /**
    *
    * 插入FunctionResources对象
    *
    * @param functionResources
    * @return 影响条件数
    */
    @Override
    public int insert(FunctionResources functionResources) throws Exception {
        return functionResourcesDao.insert(functionResources);
    }

    /**
    *
    * 更新FunctionResources对象
    *
    * @param functionResources
    * @return 影响条件数
    */
    @Override
    public int update(FunctionResources functionResources) throws Exception {
        return functionResourcesDao.update(functionResources);
    }
}
